import { createStore } from "vuex";
import user from "./modules/user"
import todos from "./modules/todos"

const state={
	isShowLoading:false	
}

const mutations={	
	hideLoading(state:any){
		state.isShowLoading=false;
	},
	showLoading(state:any){
		state.isShowLoading=true;
	}
};

const actions={	
	showLoading(context:any){  
		context.commit("showLoading");
	},
	hideLoading(context:any){	
		context.commit("hideLoading");
	}
};


export default createStore({
	state: state,
	mutations: mutations,
	actions: actions,
	modules: {
		user,
		todos
	}
});

  